package com.rc.saas.tenant.search.elec;

import com.rc.saas.tenant.base.BaseSearch;
import com.rc.saas.tenant.common.utils.BeanUtil;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

/**
 * @author wangzhengwei
 * @create 2021/7/30
 */
public class StationInvoiceSearch extends BaseSearch {

    private Long elecStationId;

    private String stationName;

    private String startTime;

    private String endTime;

    private String equipmentHlhtOperatorId;

    private String equipmentTenantCode;

    private String equipmentOperatorId;

    private String userTenantCode;

    private String orderType;

    private List<Long> stationIdList;

    private Integer count;

    public String getUserTenantCode() {
        return userTenantCode;
    }

    public void setUserTenantCode(String userTenantCode) {
        this.userTenantCode = userTenantCode;
    }

    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    public String getEquipmentTenantCode() {
        return equipmentTenantCode;
    }

    public void setEquipmentTenantCode(String equipmentTenantCode) {
        this.equipmentTenantCode = equipmentTenantCode;
    }

    public String getEquipmentOperatorId() {
        return equipmentOperatorId;
    }

    public void setEquipmentOperatorId(String equipmentOperatorId) {
        this.equipmentOperatorId = equipmentOperatorId;
    }

    public Long getElecStationId() {
        return elecStationId;
    }

    public void setElecStationId(Long elecStationId) {
        this.elecStationId = elecStationId;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        try {
            if (BeanUtil.isValid(startTime)){
                Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(startTime);
                startTime = new SimpleDateFormat("yyyyMMddHHmmss").format(date);
            }
        } catch (ParseException e) {
            e.printStackTrace();
        }
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        try {
            if (BeanUtil.isValid(endTime)){
                Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(endTime);
                endTime = new SimpleDateFormat("yyyyMMddHHmmss").format(date);
            }
        } catch (ParseException e) {
            e.printStackTrace();
        }
        this.endTime = endTime;
    }

    public List<Long> getStationIdList() {
        return stationIdList;
    }

    public void setStationIdList(List<Long> stationIdList) {
        this.stationIdList = stationIdList;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public String getEquipmentHlhtOperatorId() {
        return equipmentHlhtOperatorId;
    }

    public void setEquipmentHlhtOperatorId(String equipmentHlhtOperatorId) {
        this.equipmentHlhtOperatorId = equipmentHlhtOperatorId;
    }
}
